<cfset mySelf = viewState.getValue("mySelf") />
<cfset page = viewstate.getValue("page") />
<cfset project = viewState.getValue("project") />
<cfset projects = viewState.getValue("projects") />

<cfset xfa.continue = viewState.getValue( 'xfa.continue' )>
<div dojoType="LayoutContainer"
	layoutChildPriority='top-bottom'
	style="width: 100%; height: 100%;">
		<div dojoType="SplitContainer"
		orientation="horizontal"
		sizerWidth="5"
		activeSizing="0"
		layoutAlign="client"
	>
			<div dojoType="ContentPane" id="leftPane" label="Main" sizeMin="10" sizeShare="20" executeScripts="true" scriptSeparation="true">

				<cfloop query="projects">
					<cfoutput>
					<a href="#myself#project.main&project=#projectId#">#projectName#</a><br/>
					</cfoutput>
				</cfloop>
			</div>

			<div dojoType="ContentPane" id="rightPane" sizeShare="80">

				<div dojoType="PopupMenu2" widgetId="taskMenu" contextMenuForWindow="true">
					<div dojoType="MenuItem2" caption="Tickets" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projecttickets.livegrid&project=<cfoutput>#project#&projectId=#viewstate.getValue("projectId")#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Tasks" onClick="setMainPane('#myself#projecttasks.allinwonder');"></div>
					<div dojoType="MenuItem2" caption="Task Times" onClick="setMainPane('#myself#projecttasktime.allinwonder');"></div>
					<div dojoType="MenuItem2" caption="Time Totals" onClick="setMainPane('#myself#project.timesTotals');"></div>
					<div dojoType="MenuItem2" caption="Disabled Item" disabled="true"></div>
					<div dojoType="MenuSeparator2"></div>
					<div dojoType="MenuItem2" caption="Enabled Submenu" submenuId="projectMenu"></div>
					<div dojoType="MenuItem2" caption="Disabled Submenu" submenuId="projectMenu" disabled="true"></div>
				</div>
				
				<div dojoType="PopupMenu2" widgetId="projectMenu">
					<div dojoType="MenuItem2" caption="Projects" onClick="setMainPane('<cfoutput>#myself#</cfoutput>projectshen.allinwonder&project=<cfoutput>#project#</cfoutput>');"></div>
					<div dojoType="MenuItem2" caption="Submenu Item Two" onClick="alert('Submenu 2!')"></div>
				</div>

				<div dojoType="PopupMenu2" widgetId="configMenu">
					<div dojoType="MenuItem2" caption="Project" submenuId="configureProjectMenu"></div>
					<div dojoType="MenuItem2" caption="Issues" submenuId="configureIssueMenu"></div>
					<div dojoType="MenuItem2" caption="Factory Defaults" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.setConfigDefaults&project=<cfoutput>#project#</cfoutput>')"></div>
				</div>

				<div dojoType="PopupMenu2" widgetId="configureIssueMenu">
					<div dojoType="MenuItem2" caption="Status Types" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectticketstatuses.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Resolutions" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectticketresolutions.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Types" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projecttickettypes.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Severities" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectticketseverities.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Actions" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectticketactions.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
				</div>
				
				<div dojoType="PopupMenu2" widgetId="configureProjectMenu">
					<div dojoType="MenuItem2" caption="Versions" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectversions.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Components" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectcomponents.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Priorities" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectpriorities.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
					<div dojoType="MenuItem2" caption="Milestones" onClick="setMainPane('<cfoutput>#myself#</cfoutput>project.projectmilestones.livegrid&project=<cfoutput>#project#</cfoutput>')"></div>
				</div>
				
				<div dojoType="MenuBar2">
					<div dojoType="MenuBarItem2" caption="Tasks" submenuId="taskMenu"></div>
					<div dojoType="MenuBarItem2" caption="Projects" submenuId="projectMenu"></div>
					<div dojoType="MenuBarItem2" caption="Configuration" submenuId="configMenu"></div>
					<div dojoType="MenuBarItem2" caption="Help" submenuId="projectMenu"></div>
				</div>
				<br />

				<div id="mainTabContainerPane" dojoType="TabContainer" style="width: 98%; height: 35em; padding:5px;background:#fff" layoutAlign="client">
<!--- 
					<div id="refreshTab" dojoType="ContentPane" class="carmenTabs" href="/infobase/recentedits.cfm" refreshOnShow="true" label="Recent Edits" style="background:#fff"></div>
					<div id="lazyTab" style="display: none;" dojoType="ContentPane" class="carmenTabs" href="doc1.html" label="News"></div>
					<div id="preloadTab" dojoType="ContentPane" href="doc0.html" class="carmenTabs" label="Today @ CE"></div>
 --->
					<div id="mainPane" dojoType="ContentPane" class="carmenTabs" href="" label="Main" style="padding:5px; background:#fff" executeScripts="true" selected="true"></div>
				</div>
				
			</div>

	</div>
</div>
